package com.harmay.center.monitor.threadpool;

import java.util.concurrent.ArrayBlockingQueue;

/**
 * @author Zuper
 * @version 1.0
 * @date 2022/3/30 14:38
 */
public class BlockingQueueWrapper<T> extends ArrayBlockingQueue<T> {

    public BlockingQueueWrapper(int capacity) {
        super(capacity);
    }

    public boolean offer(T task) {
        try {
            this.put(task);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return true;
    }

}
